import  request from '@/utils/request'
enum  API{
    trademark='/admin/product/baseTrademark',
    addTrademark='/admin/product/baseTrademark/save',
    updataTrademark='/admin/product/baseTrademark/update',
    deleteTradeMark='/admin/product/baseTrademark/remove/'
}
// 获取列表数据
export const reqTradeMark=(page:number,limit:number)=>request.get(API.trademark+`/${page}/${limit}`)
// 添加品牌
export const reqAddorUpdateTradeMark=(data:any)=>{
    
    if(data.id){
        request.put(API.updataTrademark,data)

    }else{
        request.post(API.addTrademark,data)

    }
    
}
// 删除品牌 
export const deleteTradeMark=(id:number|string)=>request.delete(API.deleteTradeMark+`${id}`)